﻿Public Class ItemsBUS
    Private itDAO As New ItemsDAO()

    Public Function Items_RefreshQuantity() As Boolean
        Return itDAO.Items_RefreshQuantity()
    End Function

    Public Function Items_List() As DataSet
        Return itDAO.Items_List()
    End Function

    Public Function Item_Report_Select() As DataSet
        Return itDAO.Item_Report_Select()
    End Function

    Public Function Item_Select(ByVal ItemID As Integer) As DataSet
        Return itDAO.Item_Select(ItemID)
    End Function

    Public Function Item_Insert(ByVal ItemCode As String, _
                                ByVal CatelogyID As Integer, _
                                ByVal Name As String, _
                                ByVal Description As String, _
                                ByVal ModelNumber As String, _
                                ByVal ManufacturerID As Integer, _
                                ByVal PrimaryVendorID As Integer, _
                                ByVal SecondaryVendorID As Integer, _
                                ByVal UnitOfMeasureID As Integer, _
                                ByVal CreatedBy As String, _
                                ByVal CreatedOn As Date, _
                                ByVal ModifiedBy As String, _
                                ByVal ModifiedOn As Date, _
                                ByVal StatusInd As Boolean, _
                                ByVal Amperage As String, _
                                ByVal BuyPrice As Decimal, _
                                ByVal SellPrice As Decimal, _
                                ByVal Quantity As Integer, _
                                ByVal Notes As String, _
                                ByVal ServiceFlag As Boolean) As Boolean
        Return itDAO.Item_Insert(ItemCode, CatelogyID, Name, Description, ModelNumber, ManufacturerID, PrimaryVendorID, SecondaryVendorID, UnitOfMeasureID, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, StatusInd, Amperage, BuyPrice, SellPrice, Quantity, Notes, ServiceFlag)
    End Function

    Public Function Item_Update(ByVal ItemID As Integer, _
                                ByVal ItemCode As String, _
                                ByVal CatelogyID As Integer, _
                                ByVal Name As String, _
                                ByVal Description As String, _
                                ByVal ModelNumber As String, _
                                ByVal ManufacturerID As Integer, _
                                ByVal PrimaryVendorID As Integer, _
                                ByVal SecondaryVendorID As Integer, _
                                ByVal UnitOfMeasureID As Integer, _
                                ByVal CreatedBy As String, _
                                ByVal CreatedOn As Date, _
                                ByVal ModifiedBy As String, _
                                ByVal ModifiedOn As Date, _
                                ByVal StatusInd As Boolean, _
                                ByVal Amperage As String, _
                                ByVal BuyPrice As Decimal, _
                                ByVal SellPrice As Decimal, _
                                ByVal Quantity As Integer, _
                                ByVal Notes As String, _
                                ByVal ServiceFlag As Boolean) As Boolean
        Return itDAO.Item_Update(ItemID, ItemCode, CatelogyID, Name, Description, ModelNumber, ManufacturerID, PrimaryVendorID, SecondaryVendorID, UnitOfMeasureID, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn, StatusInd, Amperage, BuyPrice, SellPrice, Quantity, Notes, ServiceFlag)
    End Function

    Public Function Item_Delete(ByVal ItemID As Integer) As Boolean
        Return itDAO.Item_Delete(ItemID)
    End Function


End Class
